import request from '@/utils/request'
export const getRoleApi = () => {
  return request({
    url: '/auth/role',
    method: 'get',
  })
}
export const addUserApi = (data) => {
  return request({
    url: '/auth/user',
    method: 'post',
    data
  })
}
export const getUserInfoApi = (id) => {
  return request({
    url: '/auth/user/' + id,
    method: 'get',
  })
}
export const editUserApi = (data) => {
  return request({
    url: '/auth/user/' + data.id,
    method: 'put',
    data
  })
}
export const delUserApi = (id) => {
  return request({
    url: '/auth/user/' + id,
    method: 'delete'
  })
}